package com.hz.dao;

import com.hz.pojo.SafetyInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SafetyInfoDao {
    /**
     * 提现余额
     * @param open_id    用户唯一标识
     * @param account_money     提现金额
     * @return
     * @throws Exception
     */
    public abstract int updAccountMoney(@Param("open_id") String open_id,@Param("account_money")  Double account_money) throws Exception;

    /**
     * 添加提现记录表
     * @param withdrawDeposit_user_id   用户open_id
     * @param withdrawDeposit_getmoney     提现金额
     * @param withdrawDeposit_application_time      提现时间
     * @return
     * @throws Exception
     */
    public abstract int addWithdrawalInfo(@Param("withdrawDeposit_user_id")String withdrawDeposit_user_id,@Param("withdrawDeposit_getmoney")Double withdrawDeposit_getmoney,@Param("withdrawDeposit_application_time")String withdrawDeposit_application_time) throws Exception;

    /**
     * 根据open_id查询用户安全信息
     * @param open_id
     * @return
     * @throws Exception
     */
    public abstract SafetyInfo getSafetyInfo(String open_id) throws Exception;

    /**
     * 修改支付密码
     * @param open_id       用户唯一标识
     * @param pay_password  修改的支付密码
     * @return
     * @throws Exception
     */
    public abstract int updPayPassword(@Param("open_id") String open_id,@Param("pay_password")String pay_password) throws Exception;

    /**
     * 修改提现总金额
     * @param open_id   提现用户openid
     * @param withdraw_money    提现金额
     * @return
     * @throws Exception
     */
    public abstract int updWithdrawMoney(@Param("open_id") String open_id,@Param("withdraw_money") Double withdraw_money)throws Exception;
}
